<!DOCTYPE html>
<script src="../include.js"></script>
<script>
    test(() => {
        const element = document.createElement("div");
        println(`element.classList initial value: "${element.classList.toString()}"`);
        element.classList = "a";
        println(`element.classList after setting classList to "a": "${element.classList.toString()}"`);
        element.className = "";
        println(`element.classList after setting className to "": "${element.classList.toString()}"`);
        element.className = "a a b c";
        println(`element.classList after setting to className to "a a b c": "${element.classList.toString()}"`);
        element.className = "   a a b c ";
        println(`element.classList after setting to className to "   a a b c ": "${element.classList.toString()}"`);

        try {
            element.classList.replace(" ", "");
        } catch (e) {
            println(`element.classList.replace(" ", "") throws "${e.name}"`);
        }
    });
</script>
</html>
